<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 1. 利用函数书写冒泡排序 -->
    <script>
      var jsonString = "[{\"fileBucket\":\"laboratory\",\"fileCode\":\"1706768328043\",\"fileObjectName\":\"1706768328043.jpg\",\"fileOriginName\":\"car.jpg\",\"fileSizeInfo\":\"382kb\",\"fileSizeKb\":382,\"fileSuffix\":\".jpg\",\"fileType\":1,\"fileUrl\":\"http://127.0.0.1:9091/files/1706768328043.jpg\",\"fileVersion\":1,\"secretFlag\":\"N\"},{\"fileBucket\":\"laboratory\",\"fileCode\":\"1706768328052\",\"fileObjectName\":\"1706768328052.png\",\"fileOriginName\":\"lab.png\",\"fileSizeInfo\":\"114kb\",\"fileSizeKb\":114,\"fileSuffix\":\".png\",\"fileType\":1,\"fileUrl\":\"http://127.0.0.1:9091/files/1706768328052.png\",\"fileVersion\":1,\"secretFlag\":\"N\"},{\"fileBucket\":\"laboratory\",\"fileCode\":\"1706768328052\",\"fileObjectName\":\"1706768328052.webp\",\"fileOriginName\":\"Laser-on-Chip-Art-Concept-777x518.webp\",\"fileSizeInfo\":\"84kb\",\"fileSizeKb\":84,\"fileSuffix\":\".webp\",\"fileUrl\":\"http://127.0.0.1:9091/files/1706768328052.webp\",\"fileVersion\":1,\"secretFlag\":\"N\"}]";

        function fn(arr){
            /* 看一下这个数组 */
            // console.log(arr);
            // for(var i = 0 ; i < arr.length -1 ; i++){
            //     for(var j = 0 ; j < arr.length - 1 - i ; j++){
            //         //交换
            //         if(arr[j] > arr[j+1]){
            //             var temp = arr[j]
            //             arr[j] = arr[j+1]
            //             arr[j+1] = temp;
            //         }
            //     }
            // }

             console.log(jsonString);
            return arr;
        }


        var arr1 = [1,3,5,7,9,2,4,6,8]
        var result = fn(arr1)
        console.log(result);
    </script>
</body>
</html>